import { NetDrive } from "@lib/alen-helper/node/appAisle/drives/net.drive";
import { PreloadSDK } from "./preload.sdk";
(() => {
    const data = { channel: '', id: '' };
    for (let argv of process.argv) {
        for (let key of Object.keys(data)) {
            const t = '--' + key;
            if (argv.substring(0, t.length).toUpperCase() === t.toUpperCase()) {
                data[key as 'channel'] = argv.substring(t.length + 1);
                break;
            }
        }
    }
    let d = new NetDrive(data.channel);
    let s = new PreloadSDK(data.id, d, {});
    s.appReady()
        .subscribe(() => {
            setTimeout(() => {
                s.message('test message')
                    .subscribe(back => {
                        console.log(back);
                    })
            }, 3000);
        });
})();